package com.ffyc.cemp.web.controller;

import com.ffyc.cemp.common.dto.HttpResult;
import com.ffyc.cemp.domain.entity.Cinema;
import com.ffyc.cemp.domain.entity.Hall;
import com.ffyc.cemp.services.service.ICinemaService;
import com.ffyc.cemp.services.service.IHallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "影厅api接口")
@RestController
@RequestMapping("/api/hall")
public class HallController {

    @Autowired
    private IHallService ihs;

    @ApiOperation(value = "findHallsByCinema", notes = "根据电影院查询所有影厅")
    @GetMapping("/findHallsByCinema")
    public HttpResult<List<Hall>> findHallsByCinema(int cinemaId) {

        return HttpResult.success(ihs.findHallsByCinema(cinemaId));
    }


}
